package com.liuzh.fitnessplan.base

import android.os.Build
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.room.Room
import androidx.room.RoomDatabase
import com.liuzh.fitnessplan.tools.ActivitysManager

abstract class BaseActivity : AppCompatActivity(){
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            this.window.decorView.systemUiVisibility =
                View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
        }
        this.actionBar?.hide()
        ActivitysManager.instance.addActivity(this)
    }

    override fun onDestroy() {
        super.onDestroy()
        ActivitysManager.instance.removeActivity(this)
    }

}